<extend name="Base/common" />

<block name="style">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Api/css/main.css">
</block>

<block name="Content">

<div class="page-group">
    <div class="page page-current">
        <!--底部导航开始-->
        <nav class="bar bar-tab buttom-nav">
            <a class="tab-item external active" href="#">
                <span class="icon"><img src="__PUBLIC__/Api/images/nav-icon-active-1.png" alt=""></span>
                <span class="tab-label">首页</span>
            </a>
            <a class="tab-item external" href="{:U('Orders/index')}">
                <span class="icon"><img src="__PUBLIC__/Api/images/nav-icon-1.png" alt=""></span>
                <span class="tab-label">订单</span>
            </a>
            <a class="tab-item external" href="{:U('User/index')}">
                <span class="icon"><img src="__PUBLIC__/Api/images/nav-icon-2.png" alt=""></span>
                <span class="tab-label">我的</span>
            </a>
        </nav>
        <!--底部导航结束-->
        <div class="content native-scroll">
            <div class="auto-play">
                <div class="swiper-container">
                    <div class="swiper-wrapper">
                    	<notempty name="list">
                			<foreach name="list" item="view">
                        		<div class="swiper-slide">
                        			<a href="{:U('Activity/viewAction', 'id='.$view['banner_id'])}">
                        				<img src="{$view['fullpath']}" alt="" style="height:150px;">
                        			</a>
                        		</div>
                        	</foreach>
                        <else/>
                        	<div class="swiper-slide"><img src="__PUBLIC__/Apiimages/focus-img-2.png" alt=""></div>
                        	<div class="swiper-slide"><img src="__PUBLIC__/Apiimages/focus-img-2.png" alt=""></div>
                        	<div class="swiper-slide"><img src="__PUBLIC__/Apiimages/focus-img-2.png" alt=""></div>
                        </notempty>
                    </div>
                    <div class="bar bar-header-secondary">
                    	<form action="{:U('Class/index')}" method="post" id="searchform">
                        <div class="searchbar">
                            <a class="searchbar-cancel">取消</a>
                            <div class="search-input focus">
                                <label class="icon icon-search" for="search"></label>
                                <input type="search" id='param' name="param" placeholder='输入关键字...'>
                            </div>
                        </div>
                        </form>
                    </div>
                    <div class="swiper-pagination"></div>
                </div>
            </div>
            <div class="splite-line">
                <h2 class="splite-line-1"><span>帮工服务</span></h2>
            </div>
            <div class="server-list clearfix">
                <ul>
                	<notempty name="classList">
               			<foreach name="classList" item="class">
		                    <li>
		                        <a href="{:U('Class/viewAction', 'class_id='.$class['class_id'])}">
		                            <i></i><span>{$class['class_name']}</span>
		                        </a>
		                    </li>
		                </foreach>
		            </notempty>
                </ul>
            </div>
            <div class="splite-line">
                <h2 class="splite-line-1"><span>活动推荐</span></h2>
            </div>
            <div class="zan-gift">
                <ul class="clearfix">
                    <li>
                        <a href="{:U('Worker/index')}">
                            <img src="__PUBLIC__/Api/images/index-zan.png" alt=""><span>小哥推荐</span>
                        </a>
                    </li>
                    <li>
                        <a href="{:U('Share/index')}">
                            <i><img src="__PUBLIC__/Api/images/index-gift.png" alt=""></i><span>推荐有奖</span>
                        </a>
                    </li>
                </ul>
            </div>
            <div class="suggestions-complaint">
                <ul class="clearfix">
                    <li>
                        <a href="{:U('Feedback/index')}">
                            <img src="__PUBLIC__/Api/images/index-wechat.png" alt=""><span>投诉建议</span>
                        </a>
                    </li>
                    <li>
                        <a href="tel:4008526519">
                            <i><img src="__PUBLIC__/Api/images/index-phone.png" alt=""></i><span>联系客服</span>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>


</block>

<block name="script">
<script src="__PUBLIC__/Api/js/swiper.min.js" type="text/javascript"></script>
<script type="text/javascript">
var swiper = new Swiper('.swiper-container', {
    pagination: '.swiper-pagination',
    nextButton: '.swiper-button-next',
    prevButton: '.swiper-button-prev',
    paginationClickable: true,
    spaceBetween: 30,
    centeredSlides: true,
    autoplay: 2500,
    autoplayDisableOnInteraction: false
});

$("#searchform").on("submit", function(e) {
	
	var param = $("#param").val();
	
	if(!param){
		e.preventDefault();
		return false;
	}else{
		$("#searchform").submit();
	}
});
</script>
</block>

